package jp.co.toshiba.ffsa.form.csas;

import org.seasar.struts.annotation.Arg;
import org.seasar.struts.annotation.EmailType;
import org.seasar.struts.annotation.Mask;
import org.seasar.struts.annotation.Maxlength;
import org.seasar.struts.annotation.Minlength;
import org.seasar.struts.annotation.Msg;
import org.seasar.struts.annotation.Required;
import org.seasar.struts.annotation.Validwhen;

/**
 * 新規ID登録>登録内容入力
 * @author npc
 */
public class Csas101Form {
    /** メールアドレス*/
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="mail_address", resource=true))
    @Maxlength(maxlength=256, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="mail_address", resource=true), arg1=@Arg(key="256", resource=false))
    @EmailType(msg=@Msg(key="errors.invalid", resource=true), arg0=@Arg(key="mail_address", resource=true))
    public String emailAddress;

    /** パスワード */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="new_password", resource=true))
    @Maxlength(maxlength=12, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="new_password", resource=true), arg1=@Arg(key="12", resource=false))
    @Minlength(minlength=8, msg=@Msg(key="errors.minlength", resource=true), arg0=@Arg(key="new_password", resource=true), arg1=@Arg(key="8", resource=false))
    @Mask(mask="^[a-zA-Z0-9]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="new_password", resource=true))
    public String newPassword;

    /** パスワード再入力 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="Reenter_new_password", resource=true))
    @Validwhen(test="(newPassword==reenterNewPassword)",msg=@Msg(key="errors.password_mismatch", resource=true))
    public String reenterNewPassword;

    /** 名 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="first_name", resource=true))
    @Maxlength(maxlength=30, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="first_name", resource=true), arg1=@Arg(key="30", resource=false))
    @Mask(mask="^[a-zA-Z0-9 -/:-@\\[-\\`\\{-\\~]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="first_name", resource=true))
    public String firstName;

    /** 姓 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="last_name", resource=true))
    @Maxlength(maxlength=30, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="last_name", resource=true), arg1=@Arg(key="30", resource=false))
    @Mask(mask="^[a-zA-Z0-9 -/:-@\\[-\\`\\{-\\~]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="last_name", resource=true))
    public String lastName;

    /** 会社名 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="company", resource=true))
    @Maxlength(maxlength=100, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="company", resource=true), arg1=@Arg(key="100", resource=false))
    @Mask(mask="^[a-zA-Z0-9 -/:-@\\[-\\`\\{-\\~]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="company", resource=true))
    public String company;

    /** 組織名 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="department", resource=true))
    @Maxlength(maxlength=100, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="department", resource=true), arg1=@Arg(key="100", resource=false))
    @Mask(mask="^[a-zA-Z0-9 -/:-@\\[-\\`\\{-\\~]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="department", resource=true))
    public String department;

    /** 電話番号 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="phone", resource=true))
    @Maxlength(maxlength=20, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="phone", resource=true), arg1=@Arg(key="20", resource=false))
    @Mask(mask="^[0-9+-]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="phone", resource=true))
    public String phone;

    /** 地域 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="region", resource=true))
    public String region;

    /** country */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="country", resource=true))
    @Maxlength(maxlength=100, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="country", resource=true), arg1=@Arg(key="100", resource=false))
    @Mask(mask="^[a-zA-Z0-9 -/:-@\\[-\\`\\{-\\~]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="country", resource=true))
    public String country;

    /** city */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="city", resource=true))
    @Maxlength(maxlength=100, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="city", resource=true), arg1=@Arg(key="100", resource=false))
    @Mask(mask="^[a-zA-Z0-9 -/:-@\\[-\\`\\{-\\~]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="city", resource=true))
    public String city;

    /** 法人確認 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="confirm_corporation", resource=true))
    public String corporation;

    /** 地域名 */
    public String regionvar;
}